// 判断哪个端
function isMobile() {
  if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)))
    return true;
  else
    return false;
}

// 设置body
function resizeFontSize() {
  var clientWidth = document.documentElement.clientWidth || document.body.clientWidth;
  var design = (isMobile() !== false) ? 1000 : (screen.availWidth * 2);
  var size = (clientWidth > design) ? '100px' : (clientWidth / design * 100) + 'px';
  document.documentElement.style.fontSize = size
}
// resizeFontSize()
// window.onresize = function () {
//   resizeFontSize()
// }